<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>Search By Customer Birthday</title>
    <%= stylesheet_link_tag "../javascripts/ext/resources/css/ext-all.css" %>
    <%= stylesheet_link_tag "/stylesheets/tasks.css" %>
    <%= javascript_include_tag "ext/adapter/prototype/prototype.js" %>
    <%= javascript_include_tag "ext/adapter/prototype/scriptaculous.js" %>
    <%= javascript_include_tag "ext/adapter/prototype/effects.js" %>
    <%= javascript_include_tag "ext/adapter/prototype/ext-prototype-adapter.js" %>
    <%= javascript_include_tag "ext/ext-all-debug.js" %>
    <%= javascript_include_tag "ext/build/locale/ext-lang-zh_CN.js" %>
    <script>
      var viewPanel;
      var viewport;      
    </script>
  </head>
  <body>
    <input type="button" value="Test" name="test" id="test" onclick="changeurl()"/> 
    <input name="" type="button" />
    <script type="text/javascript">
        Ext.onReady(function(){
            viewPanel = new Ext.Panel({
                frame: true,
                //title: 'Views',
                //collapsible: true,
                //titleCollapse: true,
                height:400,
                width:400,
                //contentEl:'workmain',
                autoLoad: {url: "/index/index", nocache: true, scripts:true}
            });
            viewport = new Ext.Viewport({
                //enableTabScroll: true,
                renderTo: 'workmain',
                height:400,
                width:400,
                //layout: "border",
                items: [viewPanel]
            });
            
        });
        function changeurl(){
            viewport.getItem(0).getUpdater().update("/test/xyz");
        }
    </script>
    <div id="workmain"></div>
  </body>
</html>
